package com.server;

import com.domain.Resources;

import java.util.Date;
import java.util.List;

public interface ResourceService {

    //根据创建时间查询
    List<Resources> descCreateDate(Integer space_id);

    List<Resources> selectResourceByMemberId(Integer member_id);

    //根据标题名模糊查询资源
    List<Resources> selectResourceByTitle(String title);

    Resources selectResourceByTitleAndMemberId(String title,Integer member_id);

    //根据space_id返回数值
    int findResourceTotal(Integer space_id);

    //显示所有资源信息
     List<Resources> showResource(Integer space_id);

    //分页查询
     List<Resources> findAllByPage(int space_id,int page,int pageSize);

    //根据资源id显示资源信息
     Resources showResourceById(Integer id);

    //根据资源id和空间id显示资源信息
    Resources showResourceByIdAndSpaceId(Integer id,Integer space_id);

    //根据id删除资源
     Integer deleteByResourceId(Integer id);

    //根据资源名，作者，标签进行模糊查询
     List BlurredSelect(Integer space_id,String title,String author,String label);

    //根据资源id进行修改
     Integer updateResource(Integer id,String title,String content,String detail,String label,Date updatetime);

    //添加资源
     Integer insertResource(String title,String content,String author,String detail,String label,Date createdate,Date updatetime,Integer member_id,Integer space_id);

    //查询最后一条语句
     Resources findLastId();

    int deleteResourceBySpaceId(int space_id);

}
